package cn.com.itg.pojo.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@NoArgsConstructor
public class SalesOutMergeSourceDataSaveVO implements Serializable{

    /**
     * data : {"mergeSourceData":true,"vouchdate":"2020-11-30 00:00:00","warehouse":"Z001","code":"","bustype":"","details":[{"_status":"Insert","qty":12,"sourceid":0,"sourceautoid":0,"batchno":"","makeRuleCode":"","goodsposition":"whhw2467516","salesOutsSNs":[{"_status":"Insert","sn":"qwer85"}]}],"_status":"Insert"}
     */

    private DataBean data;

    @NoArgsConstructor
    @Data
    @Accessors(chain = true)
    public static class DataBean implements Serializable{
        /**
         * mergeSourceData : true
         * vouchdate : 2020-11-30 00:00:00
         * warehouse : Z001
         * code :
         * bustype :
         * details : [{"_status":"Insert","qty":12,"sourceid":0,"sourceautoid":0,"batchno":"","makeRuleCode":"","goodsposition":"whhw2467516","salesOutsSNs":[{"_status":"Insert","sn":"qwer85"}]}]
         * _status : Insert
         */

        private boolean mergeSourceData;
        private String vouchdate;
        private String warehouse;
        private String code;
        private String bustype;
        @JsonProperty("cLogisticsUserName")
        @JSONField(name = "cLogisticsUserName")
        private String cLogisticsUserName;
        @JsonProperty("cLogisticsUserPhone")
        @JSONField(name = "cLogisticsUserPhone")
        private String cLogisticsUserPhone;
        @JsonProperty("cLogisticsCarNum")
        @JSONField(name = "cLogisticsCarNum")
        private String cLogisticsCarNum;
        private String _status;
        private List<DetailsBean> details;

        @NoArgsConstructor
        @Data
        @Accessors(chain = true)
        public static class DetailsBean implements Serializable{
            /**
             * _status : Insert
             * qty : 12
             * sourceid : 0
             * sourceautoid : 0
             * batchno :
             * makeRuleCode :
             * goodsposition : whhw2467516
             * salesOutsSNs : [{"_status":"Insert","sn":"qwer85"}]
             */

            private String _status;
            private BigDecimal qty;
            private String sourceid;
            private String sourceautoid;
            private String batchno;
            private String makeRuleCode;
            private String goodsposition;
            private List<SalesOutsSNsBean> salesOutsSNs;

            @NoArgsConstructor
            @Data
            public static class SalesOutsSNsBean implements Serializable{
                /**
                 * _status : Insert
                 * sn : qwer85
                 */

                private String _status;
                private String sn;
            }
        }
    }
}
